<template>
  <view class="container">
    <uni-list>
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="姓名" :rightText="user.userName" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="性别" :rightText="user.sex==0?'男':'女'" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="年龄" :rightText="user.age" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="民族" :rightText="user.ethnic" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="学历" :rightText="user.edu" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="电话" :rightText="user.phonenumber" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="邮箱" :rightText="user.email" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="入党日期" :rightText="user.joinTime" />
            <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="备注" :rightText="user.remark" />
    </uni-list>
  </view>
</template>

<script>
  import { getUserProfile } from "@/api/system/user"

  export default {
    data() {
      return {
        user: {},
        roleGroup: "",
        postGroup: ""
      }
    },
    onLoad() {
      this.getUser()
    },
    methods: {
      getUser() {
        getUserProfile().then(response => {
         this.user=response.data
        })
      }
    }
  }
</script>

<style lang="scss">
  page {
    background-color: #ffffff;
  }
</style>
